

+function(mui, doc, app) {
	mui.init({
		statusBarBackground: "#F7F7F7"
	});

	// 退出登录
	$(function() {
		$("a.do-logout").click(function(e) {
			e.preventDefault();
			var submitUrl = this.getAttribute("data-url");
			var succUrl = this.getAttribute("data-to");
			$(this).zajax(submitUrl, function() {
				window.location.href = succUrl;
			});
		});
	});

	// 查询当前用户信息
	$(function() {
		var pnl = $(".mui-content");
		var url = pnl.attr("data-url");
		$.zajax(url, function(json) {
			if (!json.body) return;

			pnl.fillData(json.body);
			if (json.body.portrait) {
				pnl.find("img.portrait-img").attr("src", json.body.portrait);
			}
		});
	});
}(mui, document, window.app);

